package com.battle.project.user.controller;

import com.battle.project.user.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserInfoController {

    @Autowired
    private UserInfoService userInfoService;


    @GetMapping("/findUserInfo/{id}")
    public Object findUserInfo(@PathVariable("id") Integer id) {
        return userInfoService.findUserInfoById(id);
    }

    @GetMapping("/findOrderInfoById/{id}")
    public Object findOrderInfoByOrderId(@PathVariable("id") Integer id) {
        return userInfoService.findOrderInfoByOrderId(id);
    }


}
